package local.blueheart.data.springdatademo.controller;

import local.blueheart.data.springdatademo.domain.system.AppUser;
import local.blueheart.data.springdatademo.util.SecurityUtils;
import org.springframework.stereotype.Controller;

@Controller
public class BaseController {

    public AppUser getUser(){
       return SecurityUtils.getUser();
    }

    public Long getUserId(){
        return getUser().getId();
    }

    public String getUsername(){
        return  getUser().getUsername();
    }

}
